import numpy as np
import matplotlib.pyplot as plt
import cv2
#resize
def zoom(img,ratio):
    return cv2.resize(img,None,fx=ratio,fy=ratio,interpolation=cv2.INTER_CUBIC)

def wait(key):
    while(1):
        k=cv2.waitKey(1)&0xFF
        #27 is ESC
        if k==key:
            break